/**
  ******************************************************************************
  * @file    mcx314_dev.h
  * @author  yan
  * @version V1.0
  * @date    2016-11-28
  * @brief   This file provides all the MCX314 device driver function library.
  ******************************************************************************
	*/
	
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MCX314_DEV_H
#define __MCX314_DEV_H

/* Includes ------------------------------------------------------------------*/
#include "stm32f10x.h"
#include <rtthread.h>  

/** @addtogroup MCX314_dev
  * @{
  */





/** @defgroup MCX314_dev_Exported_Functions
  * @{
  */


void mcx314_init(void);
void mcx314_command(uint8_t axis,uint8_t cmd);
void mcx314_wreg1(uint8_t axis,uint16_t wdata);
void mcx314_wreg2(uint8_t axis,uint16_t wdata);
void mcx314_wreg3(uint8_t axis,uint16_t wdata);
void mcx314_range(uint8_t axis,uint32_t wdata);
void mcx314_acac(uint8_t axis,uint16_t wdata);
void mcx314_acc(uint8_t axis,uint16_t wdata);
void mcx314_dec(uint8_t axis,uint16_t wdata);
void mcx314_startv(uint8_t axis,uint16_t wdata);
void mcx314_speed(uint8_t axis,uint16_t wdata);
void mcx314_pulse(uint8_t axis,uint32_t wdata);
void mcx314_decp(uint8_t axis,uint32_t wdata);
void mcx314_center(uint8_t axis,uint32_t wdata);
void mcx314_lp(uint8_t axis,uint32_t wdata);
void mcx314_ep(uint8_t axis,uint32_t wdata);
void mcx314_compp(uint8_t axis,uint32_t wdata);
void mcx314_compm(uint8_t axis,uint32_t wdata);
void mcx314_accofst(uint8_t axis,uint32_t wdata);
uint32_t mcx314_readlp(uint8_t axis);
uint32_t mcx314_readep(uint8_t axis);
void mcx314_wait(uint8_t axis);
void mcx314_next_wait(void);
void mcx314_bp_wait(void);
void mcx314_homesrch(void);
uint16_t mcx314_test(void);

/**
  * @}
  */
	
/**
  * @}
  */
	
	
#endif

